package com.project.controller;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.project.bean.Power;
import com.project.service.IPowerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author lovo
 * @since 2022-08-18
 */
@RestController
@RequestMapping("/power")
public class PowerController {
    @Autowired
    IPowerService service;

    @GetMapping("findById/{id}")
public Power findById(@PathVariable("id") Integer id){
    QueryWrapper<Power> qw = new QueryWrapper<>();
    qw.eq("fk_userId",id);
    Power power= service.getOne(qw);
    return power;
}
}
